package com.twu.biblioteca.behavior;

import com.twu.biblioteca.UserCenter;

public class MembershipBehavior implements Behavior {
    @Override
    public void execute() {
        System.out.println(getMessage());
    }

    @Override
    public Behavior nextBehavior() {
        return new ListMenuOptionBehavior();
    }

    @Override
    public String getMessage() {
        UserCenter userCenter = UserCenter.getInstance();
        return userCenter.haveLogin() ?
                userCenter.getLoginUser().toString() : "Please talk to a Librarian. Thank you.";
    }
}
